package algorithm_primary.studyClass.新手课程.实现可插头尾队列;

import java.util.List;

/**
 * @author 衡孟浩
 * @date 2023/5/28 16:17
 */
public class DqMain {
    public static void main(String[] args) {
        DqQueue<Integer> queue = new DqQueue<>();
        queue.pushHead(1);
        queue.pushHead(2);
        queue.pushHead(3);
        queue.pushHead(4);

        queue.pushTail(3);
        queue.pushTail(2);
        queue.pushTail(1);
        Integer pollHead1 = queue.pollHead();
        int sizeHead1 = queue.size();
        System.out.println("pollHead1 = " + pollHead1);
        System.out.println("sizeHead1 = " + sizeHead1);

        Integer pollHead2 = queue.pollHead();
        int sizeHead2 = queue.size();
        System.out.println("pollHead2 = " + pollHead2);
        System.out.println("sizeHead2 = " + sizeHead2);

        Integer pollTail1 = queue.pollTail();
        int sizeTail1 = queue.size();
        System.out.println("pollTail1 = " + pollTail1);
        System.out.println("sizeTail1 = " + sizeTail1);

        Integer pollTail2 = queue.pollTail();
        int sizeTail2 = queue.size();
        System.out.println("pollTail2 = " + pollTail2);
        System.out.println("sizeTail2 = " + sizeTail2);
    }
}
